<!--
*@Author: QWP
*@Description: 隐患详情
*@Date: 2024-07-08 17:04:38
-->
<template>
  <u-dialog v-bind="$attrs"
    :hideBtns="['submit']"
    @close="dialogClose">
    <a-layout class="f-h-100">
      <a-layout-content class="s-bg-white"
        style="overflow: auto">
        <a-space  direction="vertical">
          <u-busi-card title=""
            :bordered="false">
            <u-form :elements="formEls"
              :model="form"
              :gutter="0"
              ref="formRef">
              <template #qyewm>
                <a-qrcode :value="'企业二维码'" :size="80"/>
              </template>
            </u-form>
          </u-busi-card>
        </a-space>
      </a-layout-content>
    </a-layout>
  </u-dialog>
</template>

<script lang='ts' setup>
import { ref, reactive, computed, onMounted, h } from 'vue' 

import { useRoute, useRouter } from 'vue-router'
import { _IFormEl, _IExtra } from '@/src/components/common/form/interface';
import { FormInstance, FormItemProps } from 'ant-design-vue';
import { HomeOutlined, FileTextOutlined, UploadOutlined } from '@ant-design/icons-vue';
import { TreeProps } from 'ant-design-vue/es/vc-tree';
import { ColumnProps } from 'ant-design-vue/es/table';
import { _IColumnProps } from '@/components/common/tableEdit/interface.ts'
import { fileCols } from '@/common/model/fileCols'
const route = useRoute()

const formRef = ref<FormInstance>()
const form = reactive({})
const formItemProps: FormItemProps & _IExtra = {
  labelWidth: '250px',
  colon: false
}
const formEls: Array<_IFormEl> = [
  { label: '企业二维码', key: 'qyewm', col: { span: 12,}, element: 'slot', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '管理部门', key: 'glbm', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '企业名称', key: 'qymc', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '统一社会信用代码', key: 'tydm', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '行业类别', key: 'ry', col: { span: 12, }, element: 'select', 
    formItemProps: { ...formItemProps, required: false },
    componentProps: { 
      disabled: true,
      options: [
        { label: '危险化学品', value: '1'},
      ]
    }
  },
  { label: '规模', key: 'gm', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '风险登记', key: 'fxdj', col: { span: 12, }, element: 'select', 
    formItemProps: { ...formItemProps, required: false },
    componentProps: { 
      disabled: true,
      options: [
        { label: '红', value: '1'},
        { label: '橙', value: '2'},
        { label: '黄', value: '3'},
      ]
    }
  },
  { label: '组建时间', key: 'gm', col: { span: 12,}, element: 'datepicker', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '法人代表', key: 'frdb', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '法人代表联系方式', key: 'frdblxfs', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '主要负责人', key: 'zyfzr', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '主要负责人联系方式', key: 'zyfzrlxfs', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '安全负责人', key: 'anqfzr', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '主要负责人联系方式', key: 'anqlxfs', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '安全管理人员', key: 'aqglry', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '安全管理人员联系方式', key: 'aqglrylxfs', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '实际经验地址', key: 'sjjydz', col: { span: 12,}, element: 'input', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '从业人数', key: 'cyrs', col: { span: 12,}, element: 'number', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '企业人数是否10人一下', key: 'is10xia', col: { span: 12,}, element: 'select', 
    formItemProps: { ...formItemProps, required: false },
    componentProps: { 
      disabled: true,
      options: [
        { label: '是', value: '1'},
        { label: '否', value: '2'},
      ]
    } 
  },
  { label: '是否集团公司', key: 'is10xia', col: { span: 12,}, element: 'select', 
    formItemProps: { ...formItemProps, required: false },
    componentProps: { 
      disabled: true,
      options: [
        { label: '是', value: '1'},
        { label: '否', value: '2'},
      ]
    } 
  },
  { label: '行业管理部门', key: 'hyglbm', col: { span: 24 }, element: 'textarea', 
    formItemProps: { ...formItemProps, required: false } 
  },
  { label: '经验范围', key: 'hyglbm', col: { span: 24 }, element: 'textarea', 
    formItemProps: { ...formItemProps, required: false } 
  },
]

// 弹窗关闭
const dialogClose = () => {
  formRef.value.form.resetFields();
}
</script>

<style lang='scss' >
</style>